package core.util;

import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author songduk park
 * 
 */
public abstract class AbstractController extends AbstractWeb {

	Logger logger;

	protected SqlSessionFactory sessionFactory;

	@Autowired
	public void setFactory(IBATISFactory factory) {
		this.sessionFactory = factory.getFactory();
	}

	public void debug(Object message) {
		this.logger.debug(message);
	}

	public void info(Object message) {
		this.logger.info(message);
	}

	public void error(Object message) {
		this.logger.error(message);
	}

	public void warn(Object message) {
		this.logger.warn(message);
	}
}
